import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        incomeShow: true,
        LOADING: false, //控制全局加载
        tgid: '',
        isDc: '',
        userinfo: null,
    },
    mutations: {
        $_userinfo(state, value) {
            state.userinfo = value
        },
        $_isDc(state, value) {
            state.isDc = value
        },
        showLoading(state) {
            state.LOADING = true;
        },
        hideLoading(state) {
            state.LOADING = false;
        },
        $_incomeShow(state) {
            state.incomeShow = !state.incomeShow;
        },
        $_setTgid(state, value) {
            state.tgid = value
        }
    },
    actions: {},
    getters: {},
    modules: {},
});